https://t.me/RX1948
Server : LiteSpeed
System : Linux host 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User : idnco5810 ( 1093)
PHP Version : 8.2.29
Disable Function : NONE
Directory :  /usr/local/CyberPanel/lib/python3.10/site-packages/paramiko/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/CyberPanel/lib/python3.10/site-packages/paramiko/__pycache__/proxy.cpython-310.pyc
o

��g(�
@s�ddlZddlZddlZddlmZddlZddlZd\ZZzddlZWney8Z	ze	ZWYdZ	[	ndZ	[	wwddl
mZddlm
Z
Gdd�de
�ZdS)�N)�select)NN)�ProxyCommandFailure)�ClosingContextManagerc@sPeZdZdZdd�Zdd�Zdd�Zdd	�Zed
d��Z	edd
��Z
dd�ZdS)�ProxyCommanda�
    Wraps a subprocess running ProxyCommand-driven programs.

    This class implements a the socket-like interface needed by the
    `.Transport` and `.Packetizer` classes. Using this class instead of a
    regular socket makes it possible to talk with a Popen'd command that will
    proxy traffic between the client and a server hosted in another machine.

    Instances of this class may be used as context managers.
    cCs@tdurt�t�|�|_tj|jtjtjtjdd�|_d|_dS)a
        Create a new CommandProxy instance. The instance created by this
        class can be passed as an argument to the `.Transport` class.

        :param str command_line:
            the command that should be executed and used as the proxy.
        Nr)�stdin�stdout�stderr�bufsize)	�
subprocess�subprocess_import_error�shlex�split�cmd�Popen�PIPE�process�timeout)�self�command_line�r�D/usr/local/CyberPanel/lib/python3.10/site-packages/paramiko/proxy.py�__init__3s�
zProxyCommand.__init__c
CsFz|jj�|�Wt|�Sty"}z
td�|j�|j��d}~ww)z�
        Write the content received from the SSH client to the standard
        input of the forked command.

        :param str content: string to be sent to the forked command
        � N)	rr�write�IOErrorr�joinr�strerror�len)r�content�errr�sendGs���zProxyCommand.sendc

Cs�zWd}t��}t|�|krUd}|jdur(t��|}||jkr#t���|j|}t|jjggg|�\}}}|rO|d|jjkrO|t�|jj�	�|t|��7}t|�|ks
|WStjyf|re|YS�t
y{}	z
td�|j
�|	j��d}	~	ww)z�
        Read from the standard output of the forked program.

        :param int size: how many chars should be read

        :return: the string of bytes read, which may be shorter than requested
        �Nrr)�timerr�socketrrr�os�read�filenorrrrr)
r�size�buffer�start�select_timeout�elapsed�r�w�xrrrr�recvXs2


��
��zProxyCommand.recvcCst�|jjtj�dS�N)r$�killr�pid�signal�SIGTERM�rrrr�closeyszProxyCommand.closecCs|jjduSr0)r�
returncoder5rrr�closed|szProxyCommand.closedcCs|jSr0)r8r5rrr�_closed�szProxyCommand._closedcCs
||_dSr0)r)rrrrr�
settimeout�s
zProxyCommand.settimeoutN)�__name__�
__module__�__qualname__�__doc__rr r/r6�propertyr8r9r:rrrrr's!

r)r$rr3rr#r"r
r�ImportErrorr�paramiko.ssh_exceptionr�
paramiko.utilrrrrrr�<module>s ��

https://t.me/RX1948 - 2025